/*
 * (c) ralfoide, http://gamez.googlecode.com/, 2008
 * Project: gamez
 * License TBD
 */


package com.alfray.gamez.shape;

import util.BlenderTextFileReader;


//-----------------------------------------------

/**
 * 3d shape created from a RB1 file.
 */
public class FileRB1 extends Shape {

	/**
	 * Creates a 3d shape created from a RB1 file.
	 */
    public FileRB1(BlenderTextFileReader.Object3d data, Color color) {
        
        final float diffuse[] = getColor(color);
        
        setupBuffers(data.getVertices(),
        		null /* normals */,
        		diffuse,
        		data.getIndices());
        setupTextBuffers(data.getTextureUV());
        if (data.getTextureUV().length > 0) {
        	setUseTextureUnit(0);
        }
    }
}

